package com.tkr;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
//spring 组件扫描 @Controller,@Service,@Repistory
@ComponentScan(basePackages = {"com.tkr"})
//MapperScan扫描接口生成mybatis代理对象
@MapperScan("com.tkr.dao")
//开启事务管理
@EnableTransactionManagement
//扫描tomcat组件
@ServletComponentScan("com.tkr.servlet")
public class TkrApplication {

    public static void main(String[] args) {
        SpringApplication.run(TkrApplication.class, args);
    }
}
